package com.ai.wxy.spring.web.conf;

import com.ai.wxy.spring.web.argument.RequestParamArgumentResolver;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * controller 自定义参数解析器配置
 *
 * @author 石头
 * @Date 2019/11/18
 * @Version 1.0
 **/
public class WebMethodArgumentResolverConf implements WebMvcConfigurer {
    private RequestParamArgumentResolver requestParamArgumentResolver;
    public WebMethodArgumentResolverConf(RequestParamArgumentResolver requestParamArgumentResolver){
        this.requestParamArgumentResolver = requestParamArgumentResolver;
    }
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers){
        argumentResolvers.add(requestParamArgumentResolver);
    }
}
